package cn.classLoader;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class MyClassLoader {
    //这是一个main方法,是程序的入口
    public static void main(String[] args) {
        Class<Parent> parentClass = Parent.class;
        ClassLoader classLoader = parentClass.getClassLoader();
        System.out.println(classLoader);

        System.out.println("--------------------");
        //获取父加载器
        ClassLoader parent = classLoader.getParent();
        System.out.println(parent);

        System.out.println("--------------------");
        ClassLoader parent1 = parent.getParent();
        System.out.println(parent1);


    }
}
